﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;
using Message;

namespace ServerBattle
{
    internal class BattleCommandPlayerPushHandler : PushMessageHandler<BattleCommandPlayerPush>
    {
        protected override async ETTask Handle(ISession session, BattleCommandPlayerPush push, Func<ETTask> completed)
        {
            new OnReceiveBattleCommand(push, session).Publish();
            await completed();
        }
    }

    public struct OnReceiveBattleCommand : IEventData
    {
        public BattleCommandPlayerPush command;
        public ISession session;

        public OnReceiveBattleCommand(BattleCommandPlayerPush command, ISession session)
        {
            this.command = command;
            this.session = session;
        }
    }
}